package controller;

import dao.BlockUserDao;

public class BlockUserController {

    private final BlockUserDao blockUserDao = new BlockUserDao();

    public String[] getUsers() {
        return blockUserDao.getUsers();
    }

    public boolean blockUser(Object selectedItem) {
        if (checkUserStatus(selectedItem)) {
            blockUserDao.blockUser(selectedItem);
            return true;
        }
        return false;
    }

    private boolean checkUserStatus(Object selectedItem) {
        return blockUserDao.checkUserStatus(selectedItem);
    }
}